package com.nicho.pojo;

import java.io.Serializable;
import java.util.ArrayList;

/*
 * @Author: 姜东浩
 * @Date: 2021-11-08 17:01:01
 * @LastEditors: 姜东浩
 * @LastEditTime: 2021-11-12 14:37:51
 * @Description: 学生类
 */
public class Student implements Serializable {

    // 学生ID，登录系统使用
    private String studentId;
    // 学生姓名
    private String studentName;
    // 学生密码
    private String password;
    // 学生性别
    private String sex;
    // 学生课程集合
    private ArrayList<Course> sCourseList = new ArrayList<Course>();

    private static final long serialVersionUID = 1L;

    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public ArrayList<Course> getsCourseList() {
        return sCourseList;
    }

    public void setsCourseList(ArrayList<Course> sCourseList) {
        for (Course course : sCourseList) {
            this.sCourseList.add(course);
        }
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Student [studentId=" + studentId + ", studentName=" + studentName + ", sex=" + sex + ",password="
                + password + ",sCourseList=" + sCourseList + "]";
    }

    public String toStringE(){
        return "Student [studentId=" + studentId + ", studentName=" + studentName + ",sCourseList=" + sCourseList + "]";
    }

    public String toStringR(){
        return "[学号：" + studentId + ", 姓名：" + studentName + ", 性别：" + sex + ",密码："
        + password  + "]";
    }


    public Student() {

    }

    public Student(String studentId, String password) {
        this.studentId = studentId;
        this.password = password;
    }

    public Student(String studentId, String studentName, String password, String sex) {
        this.studentId = studentId;
        this.studentName = studentName;
        this.password = password;
        this.sex = sex;
    }

    public Student(String studentId, String studentName, String password, String sex, ArrayList<Course> sCourseList) {
        this.studentId = studentId;
        this.studentName = studentName;
        this.password = password;
        this.sex = sex;
        for (Course course : sCourseList) {
            this.sCourseList.add(course);
        }
    }

}